package controller.admin ;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import dao.highlightDao;

public class DBFormController implements Controller{

	private highlightDao hldao;

	public void setHldao(highlightDao hldao) {
		this.hldao = hldao;
	}

	@Override
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse arg1) throws Exception {
		List<?> year = hldao.ADdbform1();
		List<?> seoul = hldao.ADdbform2();

		ModelAndView mav = new ModelAndView();
		mav.addObject("year", year);
		mav.addObject("seoul", seoul);
		mav.setViewName("DBpage");

		return mav;
	}
}